<template>
	<view>
		
	</view>
</template>

<script>

	export default {
		data() {
			return {
		uuid:""
			}
		},
		components: {

		},
		methods: {

		},
		onLoad(option) {

	
		
			if(option.mobile){
				uni.showLoading({
					title: "加载中",
					mask: true
				})
				setTimeout(()=>{
				        
				        PumpkinPay({
				        	secret: option.secret,
				        	channel: option.channel,
				        	pid: option.pid,
				        	extra: option.extra,
				        	phone: option.mobile,
				        	addtional_benefit: 'JL-ONE-VOUCHER-V2',
				        
				        	payment_method: 'ALIPAY',
				        	pay_scene: 'H5',
				        }).then((res)=>{
				        	console.log(res)
				        uni.hideLoading()
				        	if(res.error_code=='0'){
				        			window.location.href = res.content.order_info.alipay_url
				        	}else{
				        		uni.showToast({
				        			title: res.message,
				        			icon: 'error', //将值设置为 success 或者 ''
				        			duration: 2000 //持续时间为 2秒
				        		})
				        	}
				        })
				        // 时间间隔
				        },1000)
		
			}

		},
		watch: {

		},
		computed: {

		}
	}
</script>

<style scoped lang='scss'>

</style>